package it.rap.applications.contributions.manager.utils;

import org.eclipse.swt.graphics.Image;

public abstract class SubMenuAction implements ISubMenuAction {

    private final String name;
	private final Image  image;
	private Object data = null;

    public SubMenuAction( String name, Image image ) {
      this.name  = name;
      this.image = image;
    }
    public SubMenuAction( String name, Image image, Object data ) {
        this.name  = name;
        this.image = image;
        this.setData(data);
    }
    /**
	 * @return the name
	 */
    @Override
	public String getName() {
		return name;
	}

	@Override
	public Image getImage() {
		return image;
	}
	@Override
	public abstract void handleAction();
	
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}

}
